import request from "@/request";

export async function listPostVOByPageUsingPost(body) {
    return request({
        method: 'POST',
        url: '/api/post/list/page/vo',
        data: body
    })
}

export async function listPostVOUsingPost(body) {
    return request({
        method: 'POST',
        url: '/api/post/list/vo',
        data: body
    })
}

export async function thumbPost(postId) {
    return request({
        method: 'POST',
        url: '/api/post/thumb',
        params: {
            postId: postId
        }
    })
}

export async function thumbComment(postId) {
    return request({
        method: 'POST',
        url: '/api/post/thumbComment',
        params: {
            commentId: postId
        }
    })
}

export async function favourPost(postId) {
    return request({
        method: 'POST',
        url: '/api/post/favour',
        params: {
            postId: postId
        }
    })
}

export async function listPublishPostVOByPageUsingPost(body) {
    return request({
        method: 'POST',
        url: '/api/post/publish/list/page/vo',
        data: body
    })
}

export async function listPublishPostVOUsingPost(body) {
    return request({
        method: 'POST',
        url: '/api/post/publish/list/vo',
        data: body
    })
}

export async function listFavourPostVOByPageUsingPost(body) {
    return request({
        method: 'POST',
        url: '/api/post/favour/list/page/vo',
        data: body
    })
}

export async function listFavourPostVOUsingPost(body) {
    return request({
        method: 'POST',
        url: '/api/post/favour/list/vo',
        data: body
    })
}

export async function getPostVOByIdUsingGet(postId) {
    return request({
        method: 'GET',
        url: '/api/post/get/vo',
        params: {
            id: postId
        }
    })
}

export async function getPostCommentByPostIdUsingGet(postId) {
    return request({
        method: 'GET',
        url: '/api/post/comment',
        params: {
            postId: postId
        }
    })
}

export async function addPostCommentUsingPost(body){
    return request({
        method: 'POST',
        url: '/api/post/comment/add',
        data: body
    })
}

export async function deletePostUsingPost(body){
    return request({
        method: 'POST',
        url: '/api/post/delete',
        data: body
    })
}

export async function addPostUsingPost(body){
    return request({
        method: 'POST',
        url: '/api/post/add',
        data: body
    })
}

export async function editPostUsingPost(body){
    return request({
        method: 'POST',
        url: '/api/post/user/update',
        data: body
    })
}